package com.imilab.service.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @author yanrangnan
 * @date 2020/8/6
 */
@RestController
public class UserService {

    @Autowired
    private RestTemplate restTemplate;


    @GetMapping
    public String CallHello(){
        return restTemplate.getForObject("http://localhost:18001/hello",String.class);
    }

    @GetMapping("balanceCall")
    public String balanceCall(){
        return restTemplate.getForObject("http://api-server/hello",String.class);
    }
}
